package com.wy.panda.common.page;

import java.io.Serializable;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 分页排序参数
 * @author wangyuan
 * @since 2020年3月21日 下午2:26:05
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageOrderParam implements Serializable {
    
	private static final long serialVersionUID = -3244012418009520256L;
	
    public static final String ORDER_ASC = "ASC";
    public static final String ORDER_DESC = "DESC";
	
	/**
	 * 需要排序的列名称
	 */
    @ApiModelProperty(value = "排序字段名称")
	private String field;
	/**
	 * 排序方式：desc或者是asc
	 */
    @ApiModelProperty(value = "排序方式：desc或asc")
	private String order;
	
	public PageOrderParam(String field) {
		super();
		this.field = field;
		this.order = ORDER_ASC;
	}
}
